/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.Arrays;

/**
 * <p>Project: jse2303 - Arr4
 * <p>Powered by webrx On 2023-07-12 10:55:04
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Arr4 {
    public static void main(String[] args) {
        //数组是对象，地址引用
        int[] n = {1, 2, 3};
        int[] b = n;
        System.out.println(n[0]);
        System.out.println(b[0]);

        b[0] = 100;
        System.out.println(n[0]);
        System.out.println(b[0]);

        System.out.println(b == n);
        var c = b;
        c[2] = 200;
        System.out.println(Arrays.toString(n));
        System.out.println(Arrays.toString(b));
        System.out.println(Arrays.toString(c));


    }
}
